草庐IT

Codeforces 1672 E. notepad.exe

全部标签

python - py2exe 的相对导入错误

我试图为一个简单的Python脚本生成一个可执行文件。我的setup.py代码如下所示:fromdistutils.coreimportsetupimportpy2exesetup(console=["script.py"])但是,我收到屏幕截图中显示的错误。有什么我可以尝试解决这个问题的吗?我正在使用Windows10。 最佳答案 在你的mf3.py中你似乎是importingbeyondthetoplevel.假设您的项目结构如下:folder/main.pymod/__init__.pycomponents/__init__.

python - 将 bundle_files = 1 与 py2exe 一起使用不起作用

在经历了一些巨大的挫折之后,我做到了!我将我的django应用程序转换为“exe”应用程序,以便在Windows上作为单个独立应用程序运行(使用cherrypy作为WSGI服务器)但是,当我尝试将py2exe的选项“bundle_files”设置为“1”(即将python解释器Python25.dll捆绑在生成的exe中)时,生成的exe崩溃并显示一条关于kernel32.dll的消息但是当我使用"bundle_file"="2"时,生成的exe运行起来非常棒,但必须-当然-将Python25.dll作为一个单独的文件放在它旁边。任何人都经历过类似的行为,你能告诉我我错过了什么吗?谢谢

python - 将 bundle_files = 1 与 py2exe 一起使用不起作用

在经历了一些巨大的挫折之后,我做到了!我将我的django应用程序转换为“exe”应用程序,以便在Windows上作为单个独立应用程序运行(使用cherrypy作为WSGI服务器)但是,当我尝试将py2exe的选项“bundle_files”设置为“1”(即将python解释器Python25.dll捆绑在生成的exe中)时,生成的exe崩溃并显示一条关于kernel32.dll的消息但是当我使用"bundle_file"="2"时,生成的exe运行起来非常棒,但必须-当然-将Python25.dll作为一个单独的文件放在它旁边。任何人都经历过类似的行为,你能告诉我我错过了什么吗?谢谢

python - ImportError : No module named mpl_toolkits with maptlotlib 1. 3.0 和 py2exe

我现在不知道如何通过py2exe打包它:我正在运行命令:pythonsetup2.pypy2exe通过python2.7.5和matplotlib1.3.0以及py2exe0.6.9和0.6.10dev这适用于matplotlib1.2.x我已阅读http://www.py2exe.org/index.cgi/ExeWithEggs并尝试实现处理mpl_toolkits的建议,因为它已成为命名空间包。我也想在这里得到答案:http://matplotlib.1069221.n5.nabble.com/1-3-0-and-py2exe-regression-td41723.html向mp

python - ImportError : No module named mpl_toolkits with maptlotlib 1. 3.0 和 py2exe

我现在不知道如何通过py2exe打包它:我正在运行命令:pythonsetup2.pypy2exe通过python2.7.5和matplotlib1.3.0以及py2exe0.6.9和0.6.10dev这适用于matplotlib1.2.x我已阅读http://www.py2exe.org/index.cgi/ExeWithEggs并尝试实现处理mpl_toolkits的建议,因为它已成为命名空间包。我也想在这里得到答案:http://matplotlib.1069221.n5.nabble.com/1-3-0-and-py2exe-regression-td41723.html向mp

python - 如何使用python运行带有参数的exe文件

假设我有一个文件RegressionSystem.exe。我想用-config参数执行这个可执行文件。命令行应该是这样的:RegressionSystem.exe-configfilename我试过这样的:regression_exe_path=os.path.join(get_path_for_regression,'Debug','RegressionSystem.exe')config=os.path.join(get_path_for_regression,'config.ini')subprocess.Popen(args=[regression_exe_path,'-con

python - 如何使用python运行带有参数的exe文件

假设我有一个文件RegressionSystem.exe。我想用-config参数执行这个可执行文件。命令行应该是这样的:RegressionSystem.exe-configfilename我试过这样的:regression_exe_path=os.path.join(get_path_for_regression,'Debug','RegressionSystem.exe')config=os.path.join(get_path_for_regression,'config.ini')subprocess.Popen(args=[regression_exe_path,'-con

python - 多处理问题 [pyqt, py2exe]

我正在使用PyQt4编写一个GUI程序。我的主窗口中有一个按钮并单击此按钮。希望启动后台进程这是派生类的实例来自加工.过程.classBackgroundTask(processing.Process):def__init__(self,input):processing.Process.__init__(self)...defrun(self):...(注意我使用的是Python2.5端口获得的python-multiprocessing从http://code.google.com/p/python-multiprocessing/这就是它正在处理的原因。过程而不是multipro

python - 多处理问题 [pyqt, py2exe]

我正在使用PyQt4编写一个GUI程序。我的主窗口中有一个按钮并单击此按钮。希望启动后台进程这是派生类的实例来自加工.过程.classBackgroundTask(processing.Process):def__init__(self,input):processing.Process.__init__(self)...defrun(self):...(注意我使用的是Python2.5端口获得的python-multiprocessing从http://code.google.com/p/python-multiprocessing/这就是它正在处理的原因。过程而不是multipro

python - 带有 py2exe 的 scipy

我在64位机器上使用pythonv2.7.3和scipyv0.11.0以及py2exev0.6.10并使用来自ChristophGohlke的64位版本的包时收到以下错误消息.如果有人可以提供相关且有用的建议,我将不胜感激。这是错误消息:Traceback(mostrecentcalllast):File"test2.py",line4,inFile"scipy\sparse\__init__.pyo",line191,inFile"scipy\sparse\csgraph\__init__.pyo",line146,inFile"scipy\sparse\csgraph\_short